package com.mac.NewsAndEvents;

import com.mac.pojo.NewsAndEvents;
import com.mac.service.NewsAndEventsService;
import org.junit.Test;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @author 张舜 独家创作
 * version 1.0
 */
public class test {
    NewsAndEvents obj = new NewsAndEvents();
    NewsAndEventsService service = new NewsAndEventsService();
    @Test
    public void selectAllNewsAndEvents(){
        ArrayList<NewsAndEvents> list = service.selectAllNewsAndEvents();
        Iterator<NewsAndEvents> iterator = list.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
    @Test
    public void selectOneByeventId(){
        System.out.println(service.selectOneByeventId(1));

    }

}
